package com.manage.mapper;

import com.manage.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.manage.entity.vo.OrderCountVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderMapper extends BaseMapper<Orders> {

    @Select("SELECT bookname,sum(count) as count from orders GROUP BY bookname")
    List<OrderCountVo> orderCount();
}
